package com.hspedu.interface_;

public class InterfacePolyParameter {
    public static void main(String[] args) {

        //接口的多态
        //接口类型的变量，if01 可以指向 实现了IF接口的对象实例
        IF if01 = new Monster();
        if01 = new Car();


        //继承体现的参数多态
        AAA a01 = new BBB();
        a01 = new CCC();

    }
}

interface IF{

}

class Monster implements IF{

}

class Car implements IF{

}

class AAA{}
class BBB extends AAA{

}
class CCC extends AAA{

}